%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for mutations/v4/mutation-create.single-variables"
    Bucket0("Bucket 0 (root)"):::bucket
    Bucket1("Bucket 1 (mutationField)<br />Deps: 20, 21, 32, 2, 44, 55, 4, 59<br /><br />1: PgInsertSingle[17]<br />2: <br />ᐳ: Object[22]"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 17, 32, 2, 44, 55, 22, 4, 59<br /><br />ROOT Object{1}ᐸ{result}ᐳ[22]<br />1: <br />ᐳ: 23, 27, 29, 30, 56, 26, 31<br />2: PgSelect[28], PgSelect[42]<br />ᐳ: Access[51], Access[53]<br />3: Connection[33], Connection[45]<br />4: 35, 47<br />ᐳ: 34, 46, 52, 54, 57, 58, 38, 50"):::bucket
    Bucket5("Bucket 5 (nullableBoundary)<br />Deps: 38, 57, 17, 59, 52<br /><br />ROOT Edge{2}[38]"):::bucket
    Bucket6("Bucket 6 (nullableBoundary)<br />Deps: 50, 58, 17, 59, 54<br /><br />ROOT Edge{2}[50]"):::bucket
    Bucket7("Bucket 7 (nullableBoundary)<br />Parent side effect step: 17<br />Deps: 4, 56<br /><br />ROOT __ValueᐸrootValueᐳ[4]"):::bucket
    Bucket8("Bucket 8 (nullableBoundary)<br />Deps: 57, 17, 59<br /><br />ROOT PgSelectSingle{2}ᐸpersonᐳ[57]"):::bucket
    Bucket9("Bucket 9 (nullableBoundary)<br />Deps: 58, 17, 59<br /><br />ROOT PgSelectSingle{2}ᐸpersonᐳ[58]"):::bucket
    end
    Bucket0 --> Bucket1
    Bucket1 --> Bucket2
    Bucket2 --> Bucket5 & Bucket6 & Bucket7
    Bucket5 --> Bucket8
    Bucket6 --> Bucket9

    %% plan dependencies
    __InputObject8{{"__InputObject[8∈0] ➊<br />More deps:<br />- Constantᐸ9000ᐳ[68]<br />- Constantᐸ'John Smith Jr.'ᐳ[69]<br />- Constantᐸundefinedᐳ[7]<br />- Constantᐸ'Son of Sara and John Smith.'ᐳ[70]<br />- Constantᐸ'johnny.boy.smith@email.com'ᐳ[71]<br />- Constantᐸ'172.16.1.2'ᐳ[72]<br />- Constantᐸ'172.16.0.0/12'ᐳ[73]<br />- Constantᐸ'00:00:00:00:00:00'ᐳ[74]"}}:::plan
    __InputDynamicScalar13{{"__InputDynamicScalar[13∈0] ➊"}}:::plan
    __InputDynamicScalar13 --> __InputObject8
    __InputObject6{{"__InputObject[6∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]"}}:::plan
    __InputObject8 --> __InputObject6
    Object20{{"Object[20∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access18{{"Access[18∈0] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access19{{"Access[19∈0] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access18 & Access19 --> Object20
    ApplyInput21{{"ApplyInput[21∈0] ➊"}}:::plan
    __InputObject6 --> ApplyInput21
    Access24{{"Access[24∈0] ➊<br />ᐸ0.order1ᐳ"}}:::plan
    __Value0["__Value[0∈0] ➊<br />ᐸvariableValuesᐳ"]:::plan
    __Value0 --> Access24
    ApplyInput32{{"ApplyInput[32∈0] ➊"}}:::plan
    Access24 --> ApplyInput32
    Access39{{"Access[39∈0] ➊<br />ᐸ0.order2ᐳ"}}:::plan
    __Value0 --> Access39
    ApplyInput44{{"ApplyInput[44∈0] ➊"}}:::plan
    Access39 --> ApplyInput44
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ<br />Dependents: 4"]:::plan
    PgInsertSingle17[["PgInsertSingle[17∈1] ➊<br />ᐸperson()ᐳ"]]:::sideeffectplan
    Object20 & ApplyInput21 --> PgInsertSingle17
    Object22{{"Object[22∈1] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgInsertSingle17 --> Object22
    PgSelect28[["PgSelect[28∈2] ➊<br />ᐸpersonᐳ"]]:::plan
    Object31{{"Object[31∈2] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    PgClassExpression26{{"PgClassExpression[26∈2] ➊<br />ᐸ__person__.”id”ᐳ"}}:::plan
    Object31 & PgClassExpression26 & ApplyInput32 --> PgSelect28
    PgSelect42[["PgSelect[42∈2] ➊<br />ᐸpersonᐳ"]]:::plan
    Object31 & PgClassExpression26 & ApplyInput44 --> PgSelect42
    Access29{{"Access[29∈2] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access30{{"Access[30∈2] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access29 & Access30 --> Object31
    Edge38{{"Edge[38∈2] ➊"}}:::plan
    First34{{"First[34∈2] ➊"}}:::plan
    PgCursor52{{"PgCursor[52∈2] ➊"}}:::plan
    First34 & PgCursor52 --> Edge38
    Edge50{{"Edge[50∈2] ➊"}}:::plan
    First46{{"First[46∈2] ➊"}}:::plan
    PgCursor54{{"PgCursor[54∈2] ➊"}}:::plan
    First46 & PgCursor54 --> Edge50
    Access51{{"Access[51∈2] ➊<br />ᐸ28.cursorDetailsᐳ"}}:::plan
    First34 & Access51 --> PgCursor52
    Access53{{"Access[53∈2] ➊<br />ᐸ42.cursorDetailsᐳ"}}:::plan
    First46 & Access53 --> PgCursor54
    Access23{{"Access[23∈2] ➊<br />ᐸ17.m.clientMutationIdᐳ"}}:::plan
    Object22 o--o Access23
    Access27{{"Access[27∈2] ➊<br />ᐸ17.tᐳ"}}:::plan
    Access27 --> PgClassExpression26
    PgInsertSingle17 --> Access27
    Connection33[["Connection[33∈2] ➊<br />ᐸ28ᐳ"]]:::plan
    PgSelect28 --> Connection33
    ConnectionItems35[["ConnectionItems[35∈2] ➊"]]:::plan
    ConnectionItems35 --> First34
    Connection33 --> ConnectionItems35
    Connection45[["Connection[45∈2] ➊<br />ᐸ42ᐳ"]]:::plan
    PgSelect42 --> Connection45
    ConnectionItems47[["ConnectionItems[47∈2] ➊"]]:::plan
    ConnectionItems47 --> First46
    Connection45 --> ConnectionItems47
    PgSelect28 --> Access51
    PgSelect42 --> Access53
    Lambda56{{"Lambda[56∈2] ➊<br />ᐸrawEncodeᐳ<br />More deps:<br />- Constantᐸ'query'ᐳ[55]"}}:::plan
    PgSelectSingle57{{"PgSelectSingle[57∈2] ➊<br />ᐸpersonᐳ"}}:::plan
    First34 --> PgSelectSingle57
    PgSelectSingle58{{"PgSelectSingle[58∈2] ➊<br />ᐸpersonᐳ"}}:::plan
    First46 --> PgSelectSingle58
    List61{{"List[61∈8] ➊<br />ᐸ59,60ᐳ<br />More deps:<br />- Constantᐸ'people'ᐳ[59]"}}:::plan
    PgClassExpression60{{"PgClassExpression[60∈8] ➊<br />ᐸ__person__.”id”ᐳ"}}:::plan
    PgClassExpression60 --> List61
    PgSelectSingle57 --> PgClassExpression60
    Lambda62{{"Lambda[62∈8] ➊<br />ᐸbase64JSONEncodeᐳ"}}:::plan
    List61 --> Lambda62
    PgClassExpression66{{"PgClassExpression[66∈8] ➊<br />ᐸ__person__...full_name”ᐳ"}}:::plan
    PgSelectSingle57 --> PgClassExpression66
    List64{{"List[64∈9] ➊<br />ᐸ59,63ᐳ<br />More deps:<br />- Constantᐸ'people'ᐳ[59]"}}:::plan
    PgClassExpression63{{"PgClassExpression[63∈9] ➊<br />ᐸ__person__.”id”ᐳ"}}:::plan
    PgClassExpression63 --> List64
    PgSelectSingle58 --> PgClassExpression63
    Lambda65{{"Lambda[65∈9] ➊<br />ᐸbase64JSONEncodeᐳ"}}:::plan
    List64 --> Lambda65
    PgClassExpression67{{"PgClassExpression[67∈9] ➊<br />ᐸ__person__...full_name”ᐳ"}}:::plan
    PgSelectSingle58 --> PgClassExpression67

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value0,__Value2,__InputObject6,__InputObject8,__InputDynamicScalar13,Access18,Access19,Object20,ApplyInput21,Access24,ApplyInput32,Access39,ApplyInput44 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgInsertSingle17,Object22 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2,Access23,PgClassExpression26,Access27,PgSelect28,Access29,Access30,Object31,Connection33,First34,ConnectionItems35,Edge38,PgSelect42,Connection45,First46,ConnectionItems47,Edge50,Access51,PgCursor52,Access53,PgCursor54,Lambda56,PgSelectSingle57,PgSelectSingle58 bucket2
    classDef bucket5 stroke:#7fff00
    class Bucket5 bucket5
    classDef bucket6 stroke:#ff1493
    class Bucket6 bucket6
    classDef bucket7 stroke:#808000
    class Bucket7 bucket7
    classDef bucket8 stroke:#dda0dd
    class Bucket8,PgClassExpression60,List61,Lambda62,PgClassExpression66 bucket8
    classDef bucket9 stroke:#ff0000
    class Bucket9,PgClassExpression63,List64,Lambda65,PgClassExpression67 bucket9

    %% implicit side effects
    PgInsertSingle17 -.-o Access29
    PgInsertSingle17 -.-o Access30
    PgInsertSingle17 -.-o Lambda56

